<!--
 * @Descripttion: 
 * @version: 
 * @Author: yuanliutech
 * @Date: 2022-11-30 09:18:03
 * @LastEditors: yuanliutech@lwj
 * @LastEditTime: 2022-11-30 15:42:37
-->
<template>
  <div class="common-container">
    <div id="map" style="height: 100%"></div>
  </div>
</template>

<script>
import { initMap } from "@utils/map/map";
export default {
  name: "",
  computed: {
    isWhiteTheme() {
      return this.$store.state.config.isWhiteTheme;
    },
  },
  watch: {
    isWhiteTheme(val) {
      if (val) {
        this.map.setMapStyleId("style2");
      } else {
        this.map.setMapStyleId("style1");
      }
    },
  },
  data() {
    return {};
  },
  mounted() {
    this.map = initMap("map");
  },
  methods: {},
};
</script>

<style scoped lang="less">
</style>